package com.atguigu.jxc.dao;


import com.atguigu.jxc.entity.PurchaseList;
import com.atguigu.jxc.entity.PurchaseListGoods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PurchaseDao {


    //保存进货单
    void savePurchaseList(PurchaseList purchaseList);


    void savePurchaseListGoods(@Param("purchase") PurchaseListGoods purchase,
                               @Param("price") Integer price,
                               @Param("total") Integer total);

    List<PurchaseList> getPurchaseList(@Param("purchaseNumber") String purchaseNumber,
                                       @Param("supplierId") Integer supplierId,
                                       @Param("state") Integer state,
                                       @Param("sTime") String sTime,
                                       @Param("eTime") String eTime);

    void purchaseDeleteGoods(Integer purchaseListId);

    void purchaseDelete(Integer purchaseListId);

    void updateState(Integer purchaseListId);

    List<PurchaseListGoods> getPurchaseListGoods(Integer purchaseListId);

    List<PurchaseList> getPurchaseCount(@Param("sTime") String sTime,
                                @Param("eTime") String eTime,
                                @Param("goodsTypeId") Integer goodsTypeId,
                                @Param("codeOrName") String codeOrName);

}